/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.isen.web.webservicetemp.Dao;

import fr.isen.web.webservicetemp.Entity.Temperature;
import java.util.List;
import org.springframework.orm.hibernate3.HibernateTemplate;

/**
 *
 * @author Maistre Louis
 */
public class DaoTemperature {
    
    HibernateTemplate hibernateTemplate;

    public void setHibernateTemplate(HibernateTemplate hibernateTemplate) {
        this.hibernateTemplate = hibernateTemplate;
    } 
    public List<Temperature> getAllTemperatures()
    {
        return hibernateTemplate.find("from Temperature");
    }
    public void addTemperature(Temperature temperature)
    {
        hibernateTemplate.saveOrUpdate(temperature);
    }
    
}
